<?php
session_start(); 
//include "config.php";
include "testingsocket.php";
define("PATH",$_SESSION["localDir"]);
if ($_COOKIE['ck'] != COOKIEKEY) {  echo "no cookie............................"; header("location: login.php"); }

echo '<?xml version="1.0" encoding="iso-8859-1"?>';

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?=SITETITLE;?></title>
<meta name="keywords" content="<?=SITEKEYWORD;?>">
<meta name="description" content="<?=SITEDESC;?>">
<meta name="content-language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="content-language" content="en">
<meta http-equiv="expires" content="-1" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="Robots" content="Index all,follow">
<meta name="Resource-type" content="document">

<link rel="stylesheet" href="styles/style.css" type="text/css" />
<link rel="stylesheet" href="styles/dtree.css" type="text/css" />
<script src="jscripts/dtree.js" type="text/javascript"></script>
<script src="jscripts/global.js" type="text/javascript"></script>
<script src="jscripts/ahahLib.js" type="text/javascript"></script>
<script src="jscripts/tablesort.js" type="text/javascript"></script>
<script type="text/javascript">
 function init() {
     // quit if this function has already been called
     if (arguments.callee.done) return;

     // flag this function so we don't do the same thing twice
     arguments.callee.done = true;
     mylist('','');
 }

 /* for Mozilla */
 if (document.addEventListener) {
     document.addEventListener("DOMContentLoaded", init, null);
 }

 /* for Internet Explorer */
 /*@cc_on @*/
 /*@if (@_win32)
     document.write("<script defer src=ie_onload.js><"+"/script>");
 /*@end @*/

 /* for other browsers */
 window.onload = init;
</script>
</head>
<body>
<div id="container">
<div id="topheader"><?=SITETITLE;?></div>
<div id="thetree">
<a href="javascript: d.openAll();">Open all</a> | <a href="javascript: d.closeAll();">Close all</a> | <a href="login.php?logout=yes">Log out</a>
<p>
<script type="text/javascript">
	<!--

	d = new dTree('d');
	d.add(0,-1,'<strong>HOME</strong>','index.php','Return to home page','');		
		
	<?=read_dir(PATH);?>

	document.write(d);

	//-->
</script>
</p>
</div>
<div id="thefiles">
<p><?php include "help.inc"; ?></p>
</div>

<div id="mybasket">&nbsp;</div>

<div style = "clear:both;">
<table border="0" cellspacing="0" cellpadding="4" align="left" style="background-color:#FE9A2E;">
<tr><td>
<table>
<tr>
		    <form name="serverfiles" method="post" action="">
			<td class="tdnoborder">SFTP Dir</td>
			<td class="tdnoborder">			
				<input name="rem_dir" type="text" id="rem_dir" value="<?=$_SESSION["remDir"]?>"  size="25">
  		    </td>
			</form>
</tr>

<tr>
			<td class="tdnoborder">&nbsp;</td>
			<td class="tdnoborder">
				<input type="button" id="go" name="go" value="GO" onclick="go(document.getElementById('rem_dir').value);" class="buttons" />
			  </td>
 </tr>
 
</table>
</td>
<td>
<div id="test"> 
<?include "serverfiles.php";?>
</div>
</td>
</tr>
</table>
</div>
</div>

<script type="text/javascript" language="JavaScript">
document.forms['serverfiles'].elements['rem_dir'].focus();
</script>

<!--//Please do NOT remove or change//-->
<div id="footer">
<?=CREDIT;?> - <?=APPVERSION;?>
<form id="zipform" action="dzip.php" method="post"><input type="hidden" name="kzip" id="kzip" value=""></form>
</div>
<!--//Please do NOT remove or change//-->
</body>
</html>